@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

:root {
  --sk-cyan: #00ffcc;
  --sk-cyan-dim: #00ffcc44;
  --sk-cyan-glow: #00ffcc22;
  --sk-bg-dark: #050a0e;
  --sk-bg-card: #0a1520;
  --sk-bg-input: #0d1e2d;
  --sk-border: #1a3a4a;
  --sk-border-active: #00ffcc66;
  --sk-text: #c8e0e8;
  --sk-text-dim: #4a7a8a;
  --sk-red: #ff4466;
}

/* ── FLOATING TOGGLE BUTTON ── */
#sk-chat-toggle {
  position: fixed;
  bottom: 80px;
  right: 28px;
  left: unset;
  width: auto;
  height: 62px;
  padding: 0 16px 0 14px;
  background: var(--sk-bg-card);
  border: 1.5px solid var(--sk-cyan);
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  z-index: 99999;
  box-shadow: 0 0 20px var(--sk-cyan-dim), inset 0 0 10px var(--sk-cyan-glow);
  transition: all 0.3s ease;
}
#sk-chat-toggle:hover {
  box-shadow: 0 0 40px var(--sk-cyan-dim), 0 0 60px var(--sk-cyan-glow);
  transform: scale(1.06);
}

/* Pulse ring ::before mein */
#sk-chat-toggle::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  border: 1px solid var(--sk-cyan);
  border-radius: 4px;
  animation: sk-pulse-ring 2.2s infinite;
}
@keyframes sk-pulse-ring {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.7); opacity: 0;   }
}

/* Text ::after mein — left side */
#sk-chat-toggle::after {
  content: 'CHAT WITH SK AI';
  font-family: 'Orbitron', sans-serif;
  font-size: 9px;
  color: var(--sk-cyan);
  letter-spacing: 1.5px;
  white-space: nowrap;
  transition: opacity 0.3s;
  order: 1;
}
#sk-chat-toggle.sk-open::after {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

/* SVG icon — right side */
#sk-chat-toggle svg {
  width: 26px;
  height: 26px;
  color: var(--sk-cyan);
  transition: transform 0.3s;
  flex-shrink: 0;
  order: 2;
}
#sk-chat-toggle.sk-open svg {
  transform: rotate(45deg);
}

/* notification dot */
#sk-notif-dot {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 8px;
  height: 8px;
  background: var(--sk-cyan);
  border-radius: 50%;
  animation: sk-blink 1.8s infinite;
}
@keyframes sk-blink {
  0%, 100% { opacity: 1;    }
  50%       { opacity: 0.15; }
}

/* ── CHAT WINDOW ── */
#sk-chat-window {
  position: fixed;
  bottom: 155px;
  right: 28px;
  left: unset;
  width: 385px;
  height: 555px;
  background: var(--sk-bg-card);
  border: 1px solid var(--sk-border);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  z-index: 99998;
  overflow: hidden;
  box-shadow: 0 0 50px #00000099, 0 0 25px var(--sk-cyan-glow);
  transform: translateY(24px) scale(0.94);
  opacity: 0;
  pointer-events: none;
  transition: all 0.32s cubic-bezier(0.34, 1.56, 0.64, 1);
  font-family: 'Share Tech Mono', monospace;
}
#sk-chat-window.sk-visible {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* corner brackets */
#sk-chat-window::before,
#sk-chat-window::after {
  content: '';
  position: absolute;
  width: 13px;
  height: 13px;
  border-color: var(--sk-cyan);
  border-style: solid;
  z-index: 10;
  pointer-events: none;
}
#sk-chat-window::before { top: -1px;    left: -1px;  border-width: 2px 0 0 2px; }
#sk-chat-window::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

/* ── HEADER ── */
.sk-chat-header {
  background: linear-gradient(135deg, #0a1a28, #071520);
  border-bottom: 1px solid var(--sk-border);
  padding: 11px 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.sk-header-avatar {
  width: 36px;
  height: 36px;
  background: var(--sk-bg-dark);
  border: 1px solid var(--sk-cyan);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: var(--sk-cyan);
  font-weight: 700;
  flex-shrink: 0;
}
.sk-header-info { flex: 1; }
.sk-header-name {
  font-family: 'Orbitron', sans-serif;
  font-size: 11px;
  color: var(--sk-cyan);
  letter-spacing: 2px;
}
.sk-header-status {
  font-size: 10px;
  color: var(--sk-text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
}
.sk-status-dot {
  width: 6px;
  height: 6px;
  background: #00ff88;
  border-radius: 50%;
  animation: sk-blink 2s infinite;
}
.sk-header-close {
  background: none;
  border: 1px solid var(--sk-border);
  color: var(--sk-text-dim);
  cursor: pointer;
  font-size: 14px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
  font-family: 'Share Tech Mono', monospace;
}
.sk-header-close:hover {
  border-color: var(--sk-red);
  color: var(--sk-red);
}

/* scan line */
.sk-scan-line {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--sk-cyan), transparent);
  animation: sk-scan 3s linear infinite;
  flex-shrink: 0;
}
@keyframes sk-scan {
  0%      { transform: scaleX(0); transform-origin: left;  }
  50%     { transform: scaleX(1); transform-origin: left;  }
  50.01%  { transform: scaleX(1); transform-origin: right; }
  100%    { transform: scaleX(0); transform-origin: right; }
}

/* ── MESSAGES ── */
.sk-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.sk-chat-messages::-webkit-scrollbar { width: 3px; }
.sk-chat-messages::-webkit-scrollbar-track { background: var(--sk-bg-dark); }
.sk-chat-messages::-webkit-scrollbar-thumb { background: var(--sk-border); border-radius: 2px; }

.sk-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: sk-msg-in 0.28s ease;
}
@keyframes sk-msg-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0);    }
}
.sk-msg.sk-bot  { align-self: flex-start; }
.sk-msg.sk-user { align-self: flex-end;   }

.sk-msg-label {
  font-size: 9px;
  color: var(--sk-text-dim);
  letter-spacing: 1px;
  margin-bottom: 4px;
  padding: 0 4px;
}
.sk-msg.sk-user .sk-msg-label {
  text-align: right;
  color: var(--sk-cyan);
  opacity: 0.55;
}

.sk-msg-bubble {
  padding: 10px 13px;
  border-radius: 3px;
  font-size: 12.5px;
  line-height: 1.65;
}
.sk-msg.sk-bot .sk-msg-bubble {
  background: var(--sk-bg-input);
  border: 1px solid var(--sk-border);
  border-left: 2px solid var(--sk-cyan);
  color: var(--sk-text);
}
.sk-msg.sk-user .sk-msg-bubble {
  background: linear-gradient(135deg, #003d4a, #001e2a);
  border: 1px solid var(--sk-border-active);
  color: #e0f8f8;
}

/* quick buttons */
.sk-quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sk-quick-btn {
  background: var(--sk-bg-dark);
  border: 1px solid var(--sk-border);
  color: var(--sk-cyan);
  font-family: 'Share Tech Mono', monospace;
  font-size: 10px;
  padding: 5px 9px;
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.5px;
}
.sk-quick-btn:hover {
  border-color: var(--sk-cyan);
  background: var(--sk-cyan-glow);
  box-shadow: 0 0 8px var(--sk-cyan-glow);
}

/* typing dots */
.sk-typing-dots {
  display: flex;
  gap: 4px;
  padding: 4px 0;
  align-items: center;
}
.sk-typing-dots span {
  width: 5px;
  height: 5px;
  background: var(--sk-cyan);
  border-radius: 50%;
  animation: sk-dot-bounce 1.2s infinite;
}
.sk-typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.sk-typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes sk-dot-bounce {
  0%, 80%, 100% { transform: translateY(0);    opacity: 0.4; }
  40%           { transform: translateY(-5px); opacity: 1;   }
}

/* ── INPUT AREA ── */
.sk-chat-input-area {
  border-top: 1px solid var(--sk-border);
  padding: 11px 13px;
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  background: #070f18;
}
.sk-chat-input {
  flex: 1;
  background: var(--sk-bg-input);
  border: 1px solid var(--sk-border);
  border-radius: 3px;
  padding: 9px 11px;
  color: var(--sk-text);
  font-family: 'Share Tech Mono', monospace;
  font-size: 12px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.sk-chat-input::placeholder { color: var(--sk-text-dim); }
.sk-chat-input:focus {
  border-color: var(--sk-cyan);
  box-shadow: 0 0 8px var(--sk-cyan-glow);
}

.sk-send-btn {
  background: linear-gradient(135deg, #005544, #003322);
  border: 1px solid var(--sk-cyan);
  border-radius: 3px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}
.sk-send-btn:hover {
  background: var(--sk-cyan);
  box-shadow: 0 0 12px var(--sk-cyan-dim);
}
.sk-send-btn:hover svg { color: var(--sk-bg-dark); }
.sk-send-btn svg {
  width: 16px;
  height: 16px;
  color: var(--sk-cyan);
}
.sk-send-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* footer */
.sk-chat-footer {
  text-align: center;
  font-size: 9px;
  color: var(--sk-text-dim);
  padding: 5px;
  border-top: 1px solid var(--sk-border);
  background: #050c14;
  letter-spacing: 1px;
  font-family: 'Share Tech Mono', monospace;
}

/* ── MOBILE ── */
@media (max-width: 768px) {
  #sk-chat-toggle {
    bottom: 120px;
    right: 16px;
    left: unset;
    height: 54px;
    padding: 0 13px 0 12px;
  }
  #sk-chat-toggle::after {
    font-size: 8px;
    letter-spacing: 1px;
  }
  #sk-chat-window {
    width: calc(100vw - 24px);
    right: 12px;
    left: 12px;
    bottom: 188px;
    height: 430px;
  }
}